
<template>
  <div>
    <A></A>
  </div>
</template>

<script>
import { provide, ref } from 'vue'
import A from './components/A.vue'
export default {
  components: {
    A
  },
  setup () {
    const money = ref(100)
    // key值可以随意 尽量语义化
    provide('money', money)
    provide('changeMoney', (val) => {
      console.log(val)
      money.value = money.value - val
    })
    return {

    }
  }
}
</script>

<style>

</style>
